/*******************************************************************************
 * Copyright (c) 2009 Dop Sun.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     Dop Sun - initial API and implementation
 ******************************************************************************/
package com.softao.ming.gde.internal.ui.preferences;

import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

import com.softao.ming.gde.internal.ui.GdeUI;

/**
 * 
 */
public class InstalledGwtsPreferencePage extends FieldEditorPreferencePage implements
		IWorkbenchPreferencePage {
	private InstalledGwtFieldEditor mGwtList;
	
	/** */
	public InstalledGwtsPreferencePage() {
		super(GRID);
		noDefaultAndApplyButton();
		
		setPreferenceStore(GdeUI.getDefault().getPreferenceStore());
		setDescription("Add, remove or edit GWT definitions. By default, the checked GWT is added to the build path of newly created GWT project.");
	}
	
	/**
	 * Creates the field editors. Field editors are abstractions of
	 * the common GUI blocks needed to manipulate various types
	 * of preferences. Each field editor knows how to save and
	 * restore itself.
	 */
	public void createFieldEditors() {
		mGwtList= new InstalledGwtFieldEditor(getFieldEditorParent());
		addField(this.mGwtList);
		this.mGwtList.setLabelText("Installed GWTs:");
	}

	/* (non-Javadoc)
	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
	 */
	public void init(IWorkbench workbench) {
	}
	
}
